package org.cloud.Controller;

import org.cloud.pojo.Stu;
import org.cloud.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StuController {

    @Autowired
    private StuService stuService;

    @GetMapping("/getStuInfo")
    public String getStuInfo(int id){
        Stu stuInfo = stuService.getStuInfo(id);
        return "I'm "+stuInfo.getName();
    }
}
